package com.woniuxy02;

/**
 * @author 作者
 * @create 2025-07-18 17:43
 * 测试类，定义主方法，在主方法中创建学生对象
 */
public class StudentTest {
    public static void main(String[] args) {
        //类    对象=new 构造方法()
        Student student1 = new Student();
        //对象.属性
        student1.name="zs";
        student1.age=18;
        student1.gender="male";
        System.out.println(student1.name);
        System.out.println(student1.age);
        //对象.方法()
        student1.showInfo();
        student1.study();

        Student student2 = new Student();
        student2.name="ls";
        student2.age=19;
        student2.gender="female";
        student2.showInfo();
        student2.study();

    }
}
